﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Web;
using System.Text;

namespace API
{
    [ServiceContract(Namespace = "http://www.panda.com.cn/web")]
    public interface IREST
    {
        #region 服务接口测试

        /// <summary>
        /// 服务接口测试
        /// </summary>
        /// <param name = "test">接口参数测试</param>
        /// <returns>成功返回success，失败返回error</returns>
        [OperationContract]
        [Description("测试Get服务")]
        [WebInvoke(UriTemplate = "helloWorld?test={test}", Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        Status HelloWorld(string test);

        [OperationContract]
        [Description("测试Post服务")]
        [WebInvoke(UriTemplate = "helloWorldForPost", Method = "POST", ResponseFormat = WebMessageFormat.Json)]
        Status HelloWorldForPost(Person person);


        #endregion

    }
}
